﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Kristall.Engine
{
    public class Enemy : NPC
    {
        [XmlIgnore]
        public float Damage
        {
            get;
            set;
        }

        public Enemy()
        {
            Damage = 0.1f;
        }

        public override void OnCollide(CollisionEventArgs collision)
        {
            if (!IsAlive)
                return;

            base.OnCollide(collision);

            if (collision.Other is Player)
            {
                (collision.Other as Player).Health -= Damage;
            }
        }
    }
}
